<ol class="breadcrumb panel">
    <li><a href="#">首页</a></li>
    <li><a href="#">接口</a></li>
    <li class="active">修改接口</li>
</ol>

<form name="formValidate"  novalidate="" class="form-validate form-horizontal">
    <div class="panel panel-default "  ng-init="getGroups()">
        <div class="panel-heading"><h4>修改接口</h4></div>
        <div class="panel-body">
            <form class="form-horizontal">
                <div class="form-group">
                    <label class="col-lg-2 control-label">接口名称：</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control" ng-model="interface.name" required/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">接口用途：</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control" ng-model="interface.desc" required/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">选择分组：</label>
                    <div class="col-lg-6">
                        <select name="account" class="form-control" ng-model="interface.groupId"
                                ng-options="group._id as group.name for group in groups">
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">请求方法：</label>
                    <div class="col-lg-6">
                        <select name="account" class="form-control" ng-model="interface.method">
                            <option value="GET">GET</option>
                            <option value="POST">POST</option>
                            <option value="PUT">PUT</option>
                            <option value="DELETE">DELETE</option>
                            <option value="PATCH">PATCH</option>
                            <option value="HEAD">HEAD</option>
                            <option value="OPTIONS">OPTIONS</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">文档类型：</label>
                    <div class="col-lg-6">
                        <select name="contentType" class="form-control" ng-model="interface.contentType">
                            <option value="application/json">application/json</option>
                            <option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">*请求地址：</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control" placeholder="接口调用地址，一般填写PATH，示例：/Api/getDownloadTimes"
                               ng-model="interface.path" required/>
                    </div>
                </div>

                <!--<div class="form-group">
                    <label class="col-lg-2 control-label">请求参数：</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control" ng-model="interface.request" required/>
                    </div>
                </div>-->

                <div class="form-group">
                    <label class="col-lg-2 control-label">请求参数：</label>
                    <div class="col-lg-6">
                        <textarea class="form-control col-lg-10" rows="4" ng-model="interface.request" required></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">返回参数：</label>
                    <div class="col-lg-6">
                        <textarea class="form-control col-lg-10" rows="4" ng-model="interface.response" required></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">备注信息：</label>
                    <div class="col-lg-6">
                        <textarea class="form-control col-lg-10" rows="4" ng-model="interface.remark" required></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-6">
                        <button type="submit" class="btn btn-primary btn-block" ng-click="update()">保存</button>
                    </div>
                </div>
            </form>
        </div>
        <toaster-container toaster-options="{'position-class': 'toast-bottom-right', 'close-button':true}"></toaster-container>
    </div>
</form>